<!DOCTYPE html>
<html lang="zh">

<head>
    {% load static %}
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>录入员工信息页面</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/insert_info.css' %}">
    {% comment %} <script type="text/javascript" src="{% static 'js/insert_info.js' %}"></script> {% endcomment %}
    <script>
        function goto_index_page() {
            // 在当前页打开录入信息界面
            window.open("http://" + location.host + "/index/{{ user_name }}/", "_self");
        }
    </script>
</head>

<body>
    <header>
        <button id="goto_index" onclick="goto_index_page()">返回主页</button>
    </header>
    <main>
        <h1>录入员工信息</h1>
        <form id="employee_info_form" method="POST" action="../insert_info/">
            {% csrf_token %}
            <table>
                <tr>
                    <td class="attr">姓名</td>
                    <td><input type="text" name="name"></td>
                    <td class="attr">身份证号</td>
                    <td><input type="text" name="id_num"></td>
                </tr>
                <tr>
                    <td class="attr">性别</td>
                    <td><input type="text" name="sex"></td>
                    <td class="attr">手机号</td>
                    <td><input type="text" name="telephone"></td>
                </tr>
                <tr>
                    <td class="attr">户口</td>
                    <td><input type="text" name="household"></td>
                    <td class="attr">家庭住址</td>
                    <td><input type="text" name="home_addr"></td>
                </tr>
                <tr>
                    <td class="attr">职位</td>
                    <td><input type="text" name="post"></td>
                    <td class="attr">入职时间</td>
                    <td><input type="text" name="hire_date"></td>
                </tr>
            </table>
            <input type="submit" value="提交" id="submit_button">
        </form>

    </main>
    <footer>
        <p>Copyright © 2021 zzll0909</p>
    </footer>
</body>

</html>